﻿/*用于显示检测操作系统的一些信息
 * vesion 1.0 
 *
 */
package org.summerTree.system
{
	import flash.display.Sprite;
	import flash.display.Shape;
	import flash.system.Capabilities;
	import flash.system.*;
	import flash.geom.*;
	import flash.text.*;
	import flash.filters.GlowFilter;

	public class EnvironmentTest extends Sprite
	{
		public function EnvironmentTest()
		{
			
			var pannel:Shape=new Shape();
			addChild(pannel);
			pannel.graphics.beginFill(0xffffff);
			pannel.graphics.drawRoundRect(0,0,200,130,10,10);
			pannel.graphics.endFill();
			pannel.filters=[new GlowFilter(0x999999) ];
			
			 
			var os:String= Capabilities.os;//操作系统
            
			 //标题
			var title:TextField=new TextField();
			title.x=65;
			title.text="基本信息";
			var format:TextFormat=new TextFormat(null,14);
			title.setTextFormat(format);
			addChild(title);
			
			
			var playertype:String=Capabilities.playerType;//版本类型			
			var lang:String=Capabilities.language;//语言
			var version:String=Capabilities.version;//版本

			
			var screenx:int= Capabilities.screenResolutionX;//分辨率x
			var screeny:int= Capabilities.screenResolutionY;//分辨率y
			var screencolor= Capabilities.screenColor;//屏幕的颜色
			 
            
			var information:TextField=new TextField();
			information.y=20;
			information.x=10;
			information.width=160;
			information.height=100;
			
			information.text="操作系统: "+os+"\r"+
			                 "环境类型: "+playertype+"\r"+
						     "语言: "     +lang+"\r"+
						     "Flash版本:"+version +"\r"+						   			                 
			                 "分辨率: "+screenx.toString()+"X"+screeny.toString()+"\r"+
						     "屏幕颜色:"+screencolor;
			 addChild(information);
		}
	}
}